<?php

namespace G4T\Form;

class FormFabric
{
    public static function getFormClass($formType)
    {
        $class = 'G4T\Form\Form\\' . ucfirst(strtolower($formType)) . 'Form';
        if (!class_exists($class)) {
            throw new \Exception("$class does not exist!");
        }
        return new $class;
    }
}
